<table id="memberdata" class="layui-table site-table table-hover" width="100%" lay-skin="line" >
        <thead>
          <tr>
            <th>订单号</th>
            <th>订单状态</th>
            <th>支付状态</th>
            <th>下单日期</th>
          </tr>
        </thead>
</table>


<script>
var table;
$(function(){
	
	table = $('#memberdata').DataTable({
		"language": {
	        "url": "${staticserver}/media/zh_CN.txt"
	    },
	    "processing": true,
	    "serverSide": true,
	    "ordering": false,
	    "searching": false,
	    "lengthChange": false,
	    ajax: {
	        //指定数据源
	        type:"post",
	        url: '${ctx}/shop/admin/order/list-order-by-member-id.do?member_id=${memberid}',
	    },
	    columns: [
			{data: "sn"},      
			{data: null,"render": function(data,type,row){
	        	var val;
	        	val = getType(${status_Json!''},data.status);
	        	return val;
	        }},
			{data: "payStatus"},    
			{data: function(c_time) {
				if(c_time.create_time==null){
					return " ";
				}else{
					return  getFormatDateByLong(c_time.create_time, "yyyy-MM-dd");
				}
			}},
			
			
			
	     ]
	});
});
//订单状态
function forStruts(value, row, index) {
	var val;
	val = getType(${status_Json!''},value);
	return val;
}

function getType(exMap,value){
	var val;
	$.each(exMap,function(key,values){ 
	    if(value==key){
	    	val=values;
	    }
	});
	return val;
}

</script>

